package com.tbit.main.dao.core;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tbit.main.pojo.DetentionMachineBound;
import com.tbit.main.pojo.VO.DetentionMachineBoundVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 扣押设备绑定 Mapper 接口
 *
 * @author chen
 * @since 2023-02-08
 */
public interface DetentionMachineBoundMapper extends BaseMapper<DetentionMachineBound> {

    /**
     * 通过车辆编号查询
     *
     * @param map
     * @return
     */
    List<DetentionMachineBoundVO> getByUserCode(Map<String, Object> map);

    List<DetentionMachineBoundVO> getByDetentionId(Map<String, Object> map);


    List<DetentionMachineBoundVO> selectByDetentionId(@Param("detentionId") List<Integer> detentionId,@Param("userCode")String userCode,@Param("accountId")Integer accountId);

//    void uodateByDetentionId(@Param("detentionId") Integer detentionId, @Param("name") String name);

    /**
     * 查询车辆id集合中出扣押车辆id
     *
     * @param machineIds 车辆id集合
     * @return
     */
    List<Integer> getExist(@Param("machineIds") List<Integer> machineIds);
}
